import request from '@/utils/request'

// 工单搜索
export const searchOrderApi = (params) => {
  return request({
    url: '/api/task-service/task/search',
    method: 'GET',
    params
  })
}

// 获取工单详情

export const WordInfo = (data) => {
  return request({
    url: `/api/task-service/task/taskInfo/${data.taskId}`,
    method: 'GET',
    data
  })
}

// 根据售货机获取运营人员列表

export const OperatorListApi = (id) => {
  return request({
    url: `/api/user-service/user/operatorList/${id}`,
    method: 'GET'
  })
}

// 创建工单
export const createdWordApi = (data) => {
  return request({
    url: '/api/task-service/task/create',
    method: 'POST',
    data
  })
}

// 取消工单
export const LoseWordApi = (data) => {
  return request({
    url: `/api/task-service/task/cancel/${data.taskId}`,
    method: 'POST',
    data
  })
}

// 工单状态列表
export const wordStatus = () => {
  return request({
    url: '/api/task-service/task/allTaskStatus',
    method: 'GET'
  })
}
